package com.jinduplan.planmanager.mvp.contract

import com.cxz.kotlin.baselibs.mvp.IModel
import com.cxz.kotlin.baselibs.mvp.IPresenter
import com.cxz.kotlin.baselibs.mvp.IView
import com.jinduplan.planmanager.bean.*
import io.reactivex.rxjava3.core.Observable

interface ReportContract {

    interface View : IView {
        fun getDetail(data: ReportDetailData)
        fun reportSuccess()
        fun uploadSuccess(url:String)
        fun refreshReportList(data: ReportListRecord)
        fun loadReportList(data: ReportListRecord)

    }

    interface Presenter : IPresenter<View> {
        fun getReportList(page:String,limit:String)
        fun getReportDetail(id:String)
        fun report(
            full_name:String,
            position:String,
            content:String,
            type:String,
            images: Array<String>
        )
        fun uploadPics(pics:String)
    }

    interface Model : IModel {
        fun getReportList(page:String,limit:String): Observable<HttpResult<ReportListRecord>>
        fun getReportDetail(id:String): Observable<HttpResult<ReportDetailData>>
        fun report(full_name:String,position:String,content:String,type:String,images: Array<String>): Observable<HttpResult<ReportDetailData>>
        fun uploadPics(pics: String): Observable<HttpResult<PicUploadSuccess>>

    }
}